<?php
/**
 * 接口控制器
 */
namespace Admin\Controller;

use Think\Controller;

class TestController extends ApiBaseController
{
    public function index(){
        echo "no you can't go on ! ";exit;
    }


    //设置订单的打包服务ID
    public function set_pack_id(){

        //$list=M('order_info')->where(array('pack_id'=>0))->select();
        //foreach($list as $key=>$value)
        //{
        //    $pack_id=0;
        //    $packaging_service_fee=$value['packaging_service_fee'];
        //    if($packaging_service_fee==1){
        //        $pack_id=1; //普通打包
        //    }
        //    else if(($packaging_service_fee==0.5) || ($packaging_service_fee==0)){
        //        $pack_id=3; //到店自主打包
        //    }
        //    else if(($packaging_service_fee==5) || ($packaging_service_fee==3)  || ($packaging_service_fee==2)){
        //        $pack_id=2; //精品打包
        //    }

        //    M('order_info')->where(array('order_id'=>$value['order_id']))->save(array('pack_id'=>$pack_id));

        //}

        //exit;

    }


    //设置订单商品重量
    public function set_order_goods_weight(){

        // $list=M('order_goods')->select();
        // foreach($list as $key=>$value)
        // {
        //    $goods_id=$value['goods_id'];
        //    $goods_weight=M('goods')->where(array('goods_id'=>$goods_id))->getfield('goods_weight');


        //    M('order_goods')->where(array('rec_id'=>$value['rec_id']))->save(array('goods_weight'=>$goods_weight));

        // }

        // exit;

    }



 


}


?>

